<div class="section-title">
    <div class="section-title-block">
        <i class="material-icons close">remove</i>
        <i class="material-icons open">add</i>
        <label class="title-name" ng-bind="'dashboard.workLog.title' | translate"></label>
        <div class="kmi-can-click" ng-click="togglePanel('workLog',$event);"></div>
    </div>
    <div class="kmi-text-fields qr-code">
        <!--<input ng-keypress="input_plot_no($event);" id="input_plot" ng-model="dashboard['workLog'].barcode_plot_no" ng-init="focusInputPlot();" readonly="readonly"/>-->
        <input mdl-barcode="input_plot_no(barcode);" placeholder="{{ ORD_directive }}"/>
        <div class="tip qrcode" ng-click="qrcode_plot_no();">
            <img src="image/icons/QRCode.png">
        </div>
    </div>
</div>
<div class="section-content" style="padding-bottom:0px;overflow:hidden;">
    <div class="kmi-list column-selector" kmi-scrollbar="736px" column-selector-id="production_info_detail">
        <div class="kmi-list__header">
            <!-- 20210511 Modify by德義家興for#84772:增加一個欄位放+號 -->
            <div class="kmi-list__column" style="flex:0 0 24px;"></div>
            <div class="kmi-list__column require width-fixed" style="flex: 0 0 24px;" column-name="{{'dashboard.workLog.column6' | translate}}">
                <div class="btn-filter" ng-click="openStatusFilter();">
                    <i class="material-icons">&#xE164;</i>
                </div>
            </div>
            <!--<div class="kmi-list__column" style="flex:1 0 120px;" ng-bind="'dashboard.workLog.column1' | translate"></div>-->
            <div class="kmi-list__column head-controls require" style="flex:0 0 170px;">
                <div class="order" ng-hide="workLogFilterShow.plot_no">
                    <i class="material-icons search" style="z-index:1;" ng-click="workLogFilterShow.plot_no = true">search</i>
                    <label ng-bind="'dashboard.workLog.column1' | translate"></label>
                    <!--<i class="material-icons">{{!plot_no_oderBy?'&#xE5D8;':'&#xE5DB;'}}</i>-->
                    <!--<div class="kmi-can-click" ng-click="plot_no_oderBy = !plot_no_oderBy"></div>-->
                </div>
                <div class="filter" ng-show="workLogFilterShow.plot_no">
                    <input ng-model="workLogFilter.plot_no" style="margin-top: 4px;font-size: 13px;">
                    <i class="material-icons clear" style="position: absolute;top: 2px;right: 8px;" ng-show="workLogFilterShow.plot_no"
                        ng-click="workLogFilterShow.plot_no = false;workLogFilter.plot_no=''">clear</i>
                </div>
            </div>
            <div class="kmi-list__column head-controls hide" style="flex:0 0 60px;">
                <div class="order">
                    <label ng-bind="'dashboard.workLog.column16' | translate"></label>
                    <i class="material-icons">{{(!workLogOrder['is_urgent'])?'':(workLogOrder['is_urgent'].order)?'&#xE5D8;':'&#xE5DB;'}}</i>
                    <div class="kmi-can-click" ng-click="clickHeadOrder('is_urgent')"></div>
                </div>
            </div>
            <!--<div class="column1 kmi-list__column-split" ng-mousedown="columnResizeStart(1, $event);" ng-mousemove="columnResizing(0, $event);" ng-mouseup="columnResizeEnd(0, $event);"></div>-->
            <div class="kmi-list__column" style="flex:0 0 80px;" ng-show="dashboard.workLog.mode == 'B0201' && dashboard.dashboard_info.is_smt" ng-bind="'dashboard.workLog.column18' | translate"></div>
            <div class="kmi-list__column" style="flex:0 0 80px;" ng-show="dashboard.workLog.mode == 'B0201'" ng-bind="'dashboard.workLog.column14' | translate"></div>
            <!-- 20201127 modify by 外包 for M#82460: 自检的栏位添加 -- START-->
             <!-- 20201127 modify by shiwl for M#18991: 自,首，巡，末栏位添加表头 -- -->
            <div class="kmi-list__column" ng-bind="'dashboard.workLog.plot_check_status.SELF' | translate" style="flex:0 0 36px;" column-name="{{'dashboard.workLog.column24' | translate}}"></div>
            <!-- 20201127 modify by 外包 for M#82460: 自检的栏位添加 -- END-->
            <div class="kmi-list__column" ng-bind="'dashboard.workLog.plot_check_status.F_IPQC' | translate" style="flex:0 0 36px;" column-name="{{'dashboard.workLog.column7' | translate}}"></div>
            <div class="kmi-list__column" ng-bind="'dashboard.workLog.plot_check_status.IPQC' | translate" style="flex:0 0 36px;" column-name="{{'dashboard.workLog.column15' | translate}}"></div>
            <!-- 20201127 modify by 外包 for M#82460: 末检的栏位添加 -- START-->
            <div class="kmi-list__column" ng-bind="'dashboard.workLog.plot_check_status.END' | translate" style="flex:0 0 36px;" column-name="{{'dashboard.workLog.column25' | translate}}"></div>
            <!-- 20201127 modify by 外包 for M#82460: 末检的栏位添加 -- END-->
            <div class="kmi-list__column" style="flex:1;" ng-bind="'dashboard.workLog.column2' | translate"></div>
            <div class="kmi-list__column head-controls hide" style="flex:1;">
                <div class="order" ng-hide="item_no_show">
                    <i class="material-icons search" style="z-index:1;" ng-click="item_no_show = true">search</i>
                    <label ng-bind="'dashboard.workLog.column17' | translate"></label>
                </div>
                <div class="filter" ng-show="item_no_show">
                    <input ng-model="workLogFilter.item_no" style="margin-top: 4px;font-size: 13px;">
                    <i class="material-icons clear" style="position: absolute;top: 2px;right: 8px;" ng-show="item_no_show"
                        ng-click="item_no_show = false;workLogFilter.item_no=''">clear</i>
                </div>
            </div>
            <div class="kmi-list__column head-controls hide" style="flex:1;">
                <div class="order" ng-hide="item_name_show">
                    <i class="material-icons search" style="z-index:1;" ng-click="item_name_show = true">search</i>
                    <label ng-bind="'dashboard.workLog.column5' | translate"></label>
                </div>
                <div class="filter" ng-show="item_name_show">
                    <input ng-model="workLogFilter.item_name" style="margin-top: 4px;font-size: 13px;">
                    <i class="material-icons clear" style="position: absolute;top: 2px;right: 8px;" ng-show="item_name_show"
                        ng-click="item_name_show = false;workLogFilter.item_name=''">clear</i>
                </div>
            </div>
            <div class="kmi-list__column head-controls hide" style="flex:1;">
                <div class="order" ng-hide="workLogFilterShow.item_spec">
                    <i class="material-icons search" style="z-index:1;" ng-click="workLogFilterShow.item_spec = true">search</i>
                    <label ng-bind="'dashboard.workLog.column9' | translate"></label>
                </div>
                <div class="filter" ng-show="workLogFilterShow.item_spec">
                    <input ng-model="workLogFilter.item_spec" style="margin-top: 4px;font-size: 13px;">
                    <i class="material-icons clear" style="position: absolute;top: 2px;right: 8px;" ng-show="workLogFilterShow.item_spec"
                        ng-click="workLogFilterShow.item_spec = false;workLogFilter.item_spec=''">clear</i>
                </div>
            </div>
            <div class="kmi-list__column" style="flex:0 0 80px;" ng-bind="'dashboard.workLog.column8' | translate"></div>
            <div class="kmi-list__column" style="flex:0 0 80px;" ng-bind="'dashboard.workLog.column4' | translate"></div>
            <div class="kmi-list__column" style="flex:0 0 40px;" ng-bind="'dashboard.workLog.column10' | translate"></div>
            <div class="kmi-list__column" style="flex:0 0 90px;" ng-bind="'dashboard.workLog.column3' | translate"></div>
            <div class="kmi-list__column hide" style="flex:0 0 90px;" ng-bind="'dashboard.workLog.column11' | translate"></div>
            <div class="kmi-list__column hide" style="flex:1;" ng-bind="'dashboard.workLog.column12' | translate"></div>
            <div class="kmi-list__column hide" style="flex:1;" ng-bind="'dashboard.workLog.column19' | translate"></div>
            <div class="kmi-list__column hide" style="flex:1;" ng-bind="'dashboard.workLog.column20' | translate"></div>
            <div class="kmi-list__column hide" style="flex:1;" ng-bind="'dashboard.workLog.column21' | translate"></div>
            <div class="kmi-list__column hide" style="flex:1;" ng-bind="'dashboard.workLog.column22' | translate"></div>
            <div class="kmi-list__column" style="flex:0 0 80px;" ng-bind="'dashboard.workLog.column23' | translate" ng-show ="isFastening"></div>
            <div class="kmi-list__column hide" style="flex:1;" ng-bind="'dashboard.workLog.column26' | translate"></div>
            <!--  20211101 modify by Alan for #93040 : [成綸企業][優化]sMES整合QMS卡控出站檢，拋檢驗單時於生產任務面板增加檢驗單號及推送時間欄位
                // 增加送驗時間欄位排序功能 -->
            <div class="kmi-list__column hide head-controls" style="flex:1;" ng-click="OrderChange('send_qc_datetime')">
                <div class="order">
                    <label ng-bind="'dashboard.workLog.column27' | translate" class="ng-binding"></label>
                    <i class="material-icons" ng-show="orderColumn === 'send_qc_datetime'" style="font-size:14px;">{{reverse?'&#xE5DB;':'&#xE5D8;'}}</i>
                </div>
            </div>
            <!--  20211125 add by Alan for M#0079120:  增加"派工預計開始時間"和"派工預計完工時間"欄位 -->
            <div class="kmi-list__column hide" style="flex:1;" ng-bind="'dashboard.workLog.column28' | translate"></div>
            <div class="kmi-list__column hide" style="flex:1;" ng-bind="'dashboard.workLog.column29' | translate"></div>
        </div>
        <div class="kmi-list__row-content kmi-list__workLog">
        <!-- 20170425 當is_urgent==1則plot改為紅字 -->
        <!-- 20211101 modify by Alan for #93040 : [成綸企業][優化]sMES整合QMS卡控出站檢，拋檢驗單時於生產任務面板增加檢驗單號及推送時間欄位
        // 增加送驗時間欄位排序功能 -->
        <div class="kmi-list__row" ng-repeat="item in getPages(dashboard['workLog'].production_info_detail, PageConfig, workLogFilter, workLogOrder) | orderBy:orderColumn:reverse track by $index"
             id="{{'log_'+item.status}}" ng-class="{'log-status-c':item.status=='C', 'log-priority':item.is_urgent=='1', 'is-select':checkSelect(item)}" ng-init="countStatus(item);">
            <!-- 20210524 Modify by德義家興for#84772:增加一個欄位放+號 -->
            <div class="kmi-list__column column-border" style="flex:0 0 24px; z-index: 1;" >
                <div class="icons" ng-show="item.v_conts>1" ng-click="getWorkLogDetail(item,$event);">
                    <i class="material-icons">&#xe147;</i>
                </div>
            </div>
             <div class="kmi-list__column column-border" style="flex:0 0 24px;" ng-bind="item.status"></div>
            <div class="kmi-list__column column-border" style="flex:0 0 170px;z-index:1;position:relative;"
                ng-bind="item.plot_no" ng-click="getPlotInfo(item, $event);"></div>
            <div class="kmi-list__column column-border hide" style="flex:0 0 60px;" ng-bind="(item.is_urgent=='1')?'Y':'N'"></div>
            <div class="kmi-list__column column-border" ng-show="dashboard.workLog.mode == 'B0201' && dashboard.dashboard_info.is_smt" style="flex:0 0 80px;z-index:1;">
                <i class="material-icons dashboard-light-panel" style="z-index:10;" ng-click="loadSmtLineState(item)" style="font-size: 20px;" ng-class="[isSmtState(item.smt_line_state)]">lens</i>
            </div>
            <div class="kmi-list__column column-border" style="flex:0 0 80px;line-height: 14px;text-align: center;padding: 0px;"
                 ng-show="dashboard.workLog.mode == 'B0201'">
                <!-- <i class="material-icons" ng-if="item.plot_check_status == '10'">&#xE877;</i> -->
                <i class="material-icons" style="color:#68bd84;" ng-show="item.starting_check_status == '2'" >&#xE876;</i>
                <i class="material-icons" style="color:#db4b3c;" ng-show="item.starting_check_status == '1'">&#xE14C;</i>
            </div>
            <!-- 20201127 modify by 外包 for M#82460: 自检 灯号添加 -- START-->
            <!-- 20221107 modify by shiwl for M#18991: 添加作业站控制灯的显示和隐藏(0000,每一位分别代表自,首，巡，未)-->
            <div class="kmi-list__column column-border"  style="flex:0 0 36px; text-align: center;padding: 0px; justify-content: center;z-index:1;" ng-click="getPlotInfo(item, $event);">
                <div class="stamp-icons" ng-show="item.need_check_status!='0000'&&item.need_check_status.split('')[2]==1" ng-style="{'background':(item.plot_check_status[2]==1)?'#68bd84':(item.plot_check_status[2]==2)?'#db4b3c':(item.plot_check_status[2]==8)?'#f6cf5a':(item.plot_check_status[2]==9)?'#f6cf5a':'gray'}">
                    <!-- 20210331 modify by 奕達 for M#90325 -->
                    <i class="material-icons" style="font-size: 14px; z-index: 10; padding-bottom: 4px;" ng-bind="'dashboard.workLog.plot_check_status.SELF' | translate" mdl-toast="{{getDefectReason(item, '2');}}"></i>
                    <i class="material-icons none" ng-class="{'cross': item.plot_check_qc_status[2]==2 }">clear</i>
                </div>
            </div>
            <!-- 20201127 modify by 外包 for M#82460: 自检 灯号添加 -- END-->
            <!-- 00:未檢 01:首檢OK 02:首檢NG 10:巡檢OK 20:巡檢NG 11:首檢+巡檢OK 12:首檢NG+巡檢OK 21:首檢OK+巡檢NG  22:首檢+巡檢NG 09：首檢送驗SPC中 90：巡檢送驗SPC中 19：首檢送驗SPC中；巡檢 OK 91：巡檢送驗SPC中；首檢 OK 29：首檢送驗SPC中；巡檢 NG 92：巡檢送驗SPC中；首檢 NG 99：首檢 + 巡檢 送驗SPC中-->
            <div class="kmi-list__column column-border" style="flex:0 0 36px; text-align: center;padding: 0px; justify-content: center;z-index:1;" ng-click="getPlotInfo(item, $event);">
                <!-- 20200513 Oliver 接續 WeiTing M#68220 更改 for M#71617 - plot_check_status 拿來判斷合格還不合格 ( 0: 不變 ; 1: 及格(綠色) ; 2: 不及格(紅色); 9: 送驗SPC(黃燈); )。 -->
                <div class="stamp-icons" ng-show="item.need_check_status!='0000'&&item.need_check_status.split('')[1]==1" ng-style="{'background':(item.plot_check_status[1]==1)?'#68bd84':(item.plot_check_status[1]==2)?'#db4b3c':(item.plot_check_status[1]==8)?'#f6cf5a':(item.plot_check_status[1]==9)?'#f6cf5a':'gray'}">
                    <i class="material-icons" style="font-size: 14px; z-index: 10; padding-bottom: 4px;" ng-bind="'dashboard.workLog.plot_check_status.F_IPQC' | translate" mdl-toast="{{getDefectReason(item, '0');}}"></i>
                    <!-- 20200513 Oliver 接續 WeiTing M#68220 更改 for M#71617  -  plot_check_qc_status 判斷是否不良(打叉) ( 0: 不變 ; 1: 不變 ; 2: 不良(打叉(黑色)) )。 -->
                    <i class="material-icons none" ng-class="{'cross': item.plot_check_qc_status[1]==2 }">clear</i>
                </div>
            </div>
            <div class="kmi-list__column column-border" style="flex:0 0 36px; text-align: center;padding: 0px; justify-content: center;z-index:1;" ng-click="getPlotInfo(item, $event);">
                <!-- 20200513 Oliver 接續 WeiTing M#68220 更改 for M#71617 - plot_check_status 判斷合格還不合格 ( 0: 不變 ; 1: 及格(綠色) ; 2: 不及格(紅色); 9: 送驗SPC(黃燈);)。 -->
                <div class="stamp-icons" ng-show="item.need_check_status!='0000'&&item.need_check_status.split('')[0]==1" ng-style="{'background':(item.plot_check_status[0]==1)?'#68bd84':(item.plot_check_status[0]==2)?'#db4b3c':(item.plot_check_status[0]==8)?'#f6cf5a':(item.plot_check_status[0]==9)?'#f6cf5a':'gray'}">
                    <!-- 20210331 modify by 奕達 for M#90325 -->
                    <i class="material-icons" style="font-size: 14px; z-index: 10; padding-bottom: 4px;" ng-bind="'dashboard.workLog.plot_check_status.IPQC' | translate" mdl-toast="{{getDefectReason(item, '1');}}"></i>
                    <!-- 20200513 Oliver 接續 WeiTing M#68220 更改 for M#71617 - plot_check_qc_status 判斷是否不良(打叉) ( 0: 不變 ; 1: 不變 ; 2: 不良(打叉(黑色)) )。 -->
                    <i class="material-icons none" ng-class="{'cross': item.plot_check_qc_status[0]==2 }">clear</i>
                </div>
            </div>
            <!-- 20201127 modify by 外包 for M#82460: 末检 灯号添加 -- START-->           
            <div class="kmi-list__column column-border" style="flex:0 0 36px; text-align: center;padding: 0px; justify-content: center;z-index:1;" ng-click="getPlotInfo(item, $event);">                
                <div class="stamp-icons" ng-show="item.need_check_status!='0000'&&item.need_check_status.split('')[3]==1" ng-style="{'background':(item.plot_check_status[3]==1)?'#68bd84':(item.plot_check_status[3]==2)?'#db4b3c':(item.plot_check_status[3]==8)?'#f6cf5a':(item.plot_check_status[3]==9)?'#f6cf5a':'gray'}">
                    <!-- 20210331 modify by 奕達 for M#90325 -->
                    <i class="material-icons" style="font-size: 14px; z-index: 10; padding-bottom: 4px;" ng-bind="'dashboard.workLog.plot_check_status.END' | translate" mdl-toast="{{getDefectReason(item, '3');}}"></i>                    
                    <i class="material-icons none" ng-class="{'cross': item.plot_check_qc_status[3]==2 }">clear</i>
                </div>
            </div>
            <!-- 20201127 modify by 外包 for M#82460: 末检 灯号添加 -- END-->
            <div class="kmi-list__column column-border" style="flex:1;" ng-bind="item.op_no + '('+item.op_name+')'"></div>
            <div class="kmi-list__column column-border" style="flex:1;" ng-bind="item.item_no"></div>
            <div class="kmi-list__column column-border" style="flex:1;" ng-bind="item.item_name"></div>
            <div class="kmi-list__column column-border" style="flex:1;" ng-bind="item.item_spec"></div>
            <!-- 20170425 新增plot的燈號，is_materials= 0 顯示紅色，1 顯示綠色 和-1 不顯示顏色 -->
            <div class="kmi-list__column column-border" style="flex:0 0 80px;height: 32px;padding: 6px 0 0 6px;">
                <i class="material-icons dashboard-light-panel" style="font-size: 20px;" ng-class="[isMaterials(item.is_materials)]">lens</i>
            </div>
            <div class="kmi-list__column" style="flex:0 0 80px;" ng-bind="item.qty"></div>
            <div class="kmi-list__column column-border" style="flex:0 0 40px;" ng-bind="item.unit_no "></div>
            <div class="kmi-list__column column-border" style="flex:0 0 90px;" ng-bind="item.finish_time"></div>
            <div class="kmi-list__column hide" style="flex:0 0 90px;" ng-bind="item.dispatch_qty"></div>
            <div class="kmi-list__column hide" style="flex:1;" ng-bind="item.mo_unit_no"></div>
            <div class="kmi-list__column hide" style="flex:1;" ng-bind="item.dispatch_work_time"></div>
            <div class="kmi-list__column hide" style="flex:1;" ng-bind="item.op_plug_in_detail[0].heat_plot_no"></div>
            <div class="kmi-list__column hide" style="flex:1;" ng-bind="item.batch_mark"></div>
            <div class="kmi-list__column hide" style="flex:1;" ng-bind="item.std_pre_finish_time"></div>
            <div class="kmi-list__column" ng-show="isFastening" style="flex:1;" ng-bind="item.double_unit_qty"></div>
            <!-- 20211007 Modify by Jason for#93040: [成綸企業][優化]sMES整合QMS卡控出站檢，拋檢驗單時於生產任務面板增加檢驗單號及推送時間欄位 -->
            <div class="kmi-list__column hide" style="flex:1;" ng-bind="item.qc_formno"></div>
            <div class="kmi-list__column hide" style="flex:1;" ng-bind="item.send_qc_datetime"></div>
            <!--  20211125 add by Alan for M#0079120:  增加"派工預計開始時間"和"派工預計完工時間"欄位 -->
            <div class="kmi-list__column hide" style="flex:1;" ng-bind="item.DispStartTime"></div>
            <div class="kmi-list__column hide" style="flex:1;" ng-bind="item.DispEndTime"></div>
            <div class="kmi-can-click"  ng-click="clickPlot(item, $event);"></div>
            <!--<span ng-if="$last" ng-init="goStatusR();"></span>-->
        </div>
        </div>
    </div>
    <div class="page-content">
        <div class="page-icon">
            <img src="image/icons/dropleft.png"></img>
            <div class="kmi-can-click"  ng-click="PageConfig.page = (PageConfig.page-1<0?0:PageConfig.page-1);"></div>
        </div>
        <label ng-bind="(PageConfig.page +1)+' / '+PageConfig.total_page"></label>
        <div class="page-icon">
            <img src="image/icons/dropright.png"></img>
            <div class="kmi-can-click"  ng-click="PageConfig.page = (PageConfig.page+1>(PageConfig.total_page-1)?(PageConfig.total_page-1):PageConfig.page+1);"></div>
        </div>
    </div>
</div>
